package com.sikadwafastdaisfondturbo.pretloan.adapter

import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.sikadwafastdaisfondturbo.lib_baseadapter.SikadwaRecyclerViewAdapter
import com.sikadwafastdaisfondturbo.lib_baseadapter.SikadwaViewHolderHelper
import com.sikadwafastdaisfondturbo.pretloan.R
import org.json.JSONObject

/**
 * Sikadwa
 * @Author wwdeng
 * @CreateTime: 2024/4/19 17:24
 * @Annotation：身份验证类型适配器
 */
class PermissionAdapter (recyclerView: RecyclerView?) : SikadwaRecyclerViewAdapter<JSONObject>(recyclerView, R.layout.item_permission) {

    override fun setItemChildListener(helper: SikadwaViewHolderHelper, viewType: Int) {
        helper.setItemChildClickListener(R.id.itemLayout) //点击Item
    }

    override fun fillData(helper: SikadwaViewHolderHelper, position: Int, model: JSONObject) {
        helper.setText(R.id.tvTitle,model.optString("title"))
        helper.setVisibility(R.id.tvTitle, View.GONE)
        helper.setText(R.id.tvDes,model.optString("des"))
    }
}